/**
 * 
 */
package cz.cvut.fit.crhonjar.mi.run.hawera.exception;

/**
 * @author Jarec
 * 
 */
public class HaweraException extends Exception {

	private static final long serialVersionUID = 1L;

	private ErrorCode errorCode;

	/**
	 * constructor with error code as parameter
	 * 
	 * @param ec
	 */
	public HaweraException(ErrorCode ec) {
		super();
		this.errorCode = ec;
	}

	/**
	 * construct exception using error code and message
	 * 
	 * @param ec
	 * @param message
	 */
	public HaweraException(ErrorCode ec, String message) {
		super(message);
		this.errorCode = ec;
	}

	/**
	 * gives error code of exception
	 * 
	 * @return
	 */
	public ErrorCode getErrorCode() {
		return this.errorCode;
	}

}
